<template>
	<view class="order-box">
		<view class="order-control">
			<uni-segmented-control :current="current" :values="items" style-type="text" active-color="#007aff"
				@clickItem="onClickItem" />
		</view>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				items: ['全部', '待付款', '待发货','待收货','已完成'],
				current: 0,
			}
		},
		methods: {
			onClickItem(e) {
				if (this.current !== e.currentIndex) {
					this.current = e.currentIndex
				}
			},
		}
	}
</script>

<style scoped lang="scss">
	.order-control{
		background-color: #fff;
		box-sizing: border-box;
		padding: 10rpx;
	}
</style>